<template>
  <div id="app">
    <router-view @change-view="onChangeView"/>
  </div>
</template>

<script>

export default {
  name: 'app',
  methods: {
    onChangeView (event) {
      console.log(event)
      this.$router.push(event)
    }
  },
  computed: {
    state () {
      return this.$store.state.routerParams
    }
  },
  watch: {
    '$store.state.routerParams' (newval, oldval) {
      this.$router.push(newval)
    },
    state (newval, oldval) {
      console.log('111', newval)
    }
  }
}

</script>
<style lang="scss">
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
}
</style>
